addToSet(target, source) | |
assertIsString(value, errorMessage) | Throws if value is not a string |
asyncNoop() | |
at(iterable, index) | Finds element by index, including negative index |
awaitRecord(obj) | Awaits a record of promises, and returns a record of their results. |
capitalizeFirstLetter(val) | Capitalize the first letter of a string |
chain(value) | Chain iterable operations, each acting on the output of the previous step |
chain(value) | Chain iterable operations, each acting on the output of the previous step |
clamp(value, min, max) | |
concat(iterables) | |
createRandomIntWithSeed(seed) | |
defaults(_source, _defaultValues, deep, shouldUseDefault) | Returns an object where missing keys and values/keys that satisfy shouldUseDefault to the value in shouldUseDefault. |
delayed(fn, wait) | Ensures func will be called with at least wait ms between runs. |
enforceSequentialExecution(fn) | Ensures that when the async function fn is called twice in a row, the second call only begins after the first one has finished (successfully or not). |
enumValues(enumObj) | |
enumValues(enumObj) | |
equalIdents(reference, modified, newline) | Matches the indentation of modified to the one of reference |
errorToPlainObject(error) | |
escapeCSS(str) | Replaced non alphanumeric character with CSS unicode representation |
escapeRegExp(str) | Returns a string safe to be used in RegExp |
every(iterable, predicate) | |
exclude(excluded) | |
filter(iterable, predicate) | |
find(iterable, predicate) | |
first(iterable) | Picks the first element of an iterable |
flat(iterable, deep) | |
flatMap(iterable, mapFn) | |
forEach(iterable, fn) | |
get(obj, key) | Similar to Map.get, but works for plain objects, and returns undefined for null maps and missing keys |
get(obj, key) | |
getCartesianProduct(arrays) | |
getErrorCode(error) | Returns error.code property if the error object has it, otherwise returns undefined. |
getIn(obj, path) | |
getOs() | |
getValue(map, key, errorMessage) | Returns a value by key, throws if the value is missing or the map null |
getValue(map, key, errorMessage) | |
getValue(map, key, errorMessage) | |
groupBy(elements, property) | Groups elements by the value of a property |
has(obj, key) | Similar to Map.has, but works for plain objects, and returns false for null maps |
has(obj, key) | Similar to Map.has, but works for plain objects, and returns false for null maps |
has(obj, key) | |
histogram(iterable) | Calculate a histogram of iterable elements |
includes(iterable, item) | |
includesCaseInsensitive(str, substr) | Checks if str contains substr ignoring capitalization |
indexToLineAndColumn(content, pos, newline) | Finds line an column by position index |
isDefined(value) | Given a value of type Nullable, validates value is T |
isEmpty(iterable) | Checks if an iterable is empty |
isErrorLikeObject(error) | Checks if the error is an object compatible with the Error interface; that is, it has properties 'name' and 'message' of type string. The object could be an instance of an Error, or it could be some other kind of object that has these properties. |
isIterable(x) | |
isMap(m) | Validates s is an instance of Map |
isObject(value) | Checks if value is an object, e.g. a plain object, an array, a function, a regex, but not a primitive value. Common usage scenario: |